package com.mswork.mes.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mswork.common.annotation.Excel;
import com.mswork.common.core.domain.BaseEntity;

/**
 * 货物对象 tb_project_cargo
 *
 * @author manshu
 * @date 2025-03-03
 */
public class ProjectCargo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID（自增）
     */
    private Integer cargoId;

    /**
     * 货物名称
     */
    @Excel(name = "货物名称")
    private String cargoName;

    /**
     * 货物数量
     */
    @Excel(name = "货物数量")
    private Integer cargoNum;

    /**
     * 入库货物剩余数量
     */
    private Integer cargoInputNum;

    /**
     * 出货物剩余数量
     */
    private Integer cargoOutNum;

    /**
     * 货物状态0未完成,1已完成
     */
    private Integer cargoStatus;

    /**
     * 项目ID
     */
    private Integer projectId;

    /**
     * 0无效,1有效
     */
    private Integer status;

    /**
     * 差值
     */
    private Long cargoNumDiff;

    public void setCargoId(Integer cargoId) {
        this.cargoId = cargoId;
    }

    public Integer getCargoId() {
        return cargoId;
    }

    public void setCargoName(String cargoName) {
        this.cargoName = cargoName;
    }

    public String getCargoName() {
        return cargoName;
    }

    public void setCargoNum(Integer cargoNum) {
        this.cargoNum = cargoNum;
    }

    public Integer getCargoNum() {
        return cargoNum;
    }

    public void setCargoInputNum(Integer cargoInputNum) {
        this.cargoInputNum = cargoInputNum;
    }

    public Integer getCargoInputNum() {
        return cargoInputNum;
    }

    public void setCargoOutNum(Integer cargoOutNum) {
        this.cargoOutNum = cargoOutNum;
    }

    public Integer getCargoOutNum() {
        return cargoOutNum;
    }

    public void setCargoStatus(Integer cargoStatus) {
        this.cargoStatus = cargoStatus;
    }

    public Integer getCargoStatus() {
        return cargoStatus;
    }

    public void setProjectId(Integer projectId) {
        this.projectId = projectId;
    }

    public Integer getProjectId() {
        return projectId;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void initCargoNum() {
        this.cargoInputNum = this.cargoNum;
        this.cargoOutNum = 0;
    }

    public Long getCargoNumDiff() {
        return cargoNumDiff;
    }

    public void setCargoNumDiff(Long cargoNumDiff) {
        this.cargoNumDiff = cargoNumDiff;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("cargoId", getCargoId())
                .append("cargoName", getCargoName())
                .append("cargoNum", getCargoNum())
                .append("cargoInputNum", getCargoInputNum())
                .append("cargoOutNum", getCargoOutNum())
                .append("cargoStatus", getCargoStatus())
                .append("projectId", getProjectId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("status", getStatus())
                .toString();
    }
}
